package com.wuze.cloud.dao;

import com.wuze.cloud.pojo.SysFolderRelationDO;
import com.wuze.cloud.request.SysFolderQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author: wuze
 * @description:
 * @date: 2023/02/19
 */
@Repository
public interface SysFolderRelationDao {

    List<SysFolderRelationDO> findByPage(@Param("query") SysFolderQuery query, @Param("state") String state);
    Integer count(@Param("query") SysFolderQuery query, @Param("state") String state);
    List<SysFolderRelationDO> findByPids(@Param("ids")List<Long> ids , @Param("type") String type ,@Param("state") String state);

    void add(@Param("relation") SysFolderRelationDO folderRelationDO);

    void batchUpdateState(@Param("ids") Set<Long> ids , @Param("state") String state);

    void update(@Param("childId") Long childId, @Param("pid") Long pid , @Param("chileName") String chileName);

    void batchRestoreOrDel(@Param("ids") Set<Long> ids,
                           @Param("rootId") Long rootId,
                           @Param("uuid") String uuid);
}
